<%-- 
    Document   : contactform
    Created on : Nov 5, 2014, 4:20:52 PM
    Author     : Satyapal Deshmukh
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>

    

    </head>
    <body>
         <%

        org.hibernate.SessionFactory sessionFactory=acmehibernate.ACMEHibernateUtil.getSessionFactory();
        org.hibernate.Session session1=sessionFactory.openSession();
        org.hibernate.Transaction transaction=session1.beginTransaction();

        acmehibernate.ContactForm contactForm= new acmehibernate.ContactForm((String)request.getParameter("contactName"),(String)request.getParameter("contactEmail"), (String)request.getParameter("contactSubject"),(String)request.getParameter("contactMessage"),null,null,null,null);

        //acmehibernate.ContactForm contactForm=new acmehibernate.ContactForm((String)request.getParameter("one"), (String)request.getParameter("two"), (String)request.getParameter("three"), (String)request.getParameter("four"), null, null, null, null);
        session1.save(contactForm);
        transaction.commit();

        response.sendRedirect("index.jsp");

        %>

    

    </body>
</html>
